<template>
    <div>
        <myheader></myheader>
        <br>

        <div>修改密码：<input type="password" v-model="password"></div>
        <br>

        <Button color = 'blue' @click="password1">修改密码</Button>



        <br>
        <myfooter></myfooter>
    </div>
</template>
<script>
//组件包含
import myheader from './myheader.vue';
import myfooter from './myfooter.vue';
export default {
    data() {
        return {
             //面包屑导航
      datas:[{title:'首页',route:{name:'index'}},{title:'我的主页'}],
      password:'',
            
        }
    },
     //定义组件
  components:{
	'myheader':myheader,
	'myfooter':myfooter
  },
    methods: {
        //修改密码
    password1:function(){

  		//发送请求
		this.axios.get('http://localhost:8000/updatepassword/',{params:{uid:localStorage.getItem('uid'),password:this.password}}).then((result) =>{

			console.log(result);

			this.$Message(result.data.message);

		});


  	},
        
    },
    mounted() {
        
    },
}
</script>